import { ref } from 'vue'
import OtaUpload from '@/components/ota-upload'
import { IOtaUpload } from '@/store/main/hardware/types'

export const useOtaUpload = () => {
  console.log('hhhhhhhhhelllo')
  const otaUploadRef = ref<InstanceType<typeof OtaUpload>>()
  const handleUploadClick = (uploadInfo: IOtaUpload) => {
    otaUploadRef.value?.otaUpload(uploadInfo)
  }

  return [otaUploadRef, handleUploadClick]
}
